<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<c:set scope="request" var="title" value="订单详情"></c:set>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<title>${ title }</title>
    <base href="${ pageContext.servletContext.contextPath }/">
    <link rel="icon" href="statics/img/favicon.svg" sizes="any" type="image/svg+xml">
    <link rel="stylesheet" href="statics/css/base.css">
    <link rel="stylesheet" href="statics/css/manager.css">
</head>
<body>
	<%@include file="/pages/common/header.jsp"%>
	<main>
		<section class="table-header flex">
			<p class="flex-1 flex-center color-danger">${ order_message }</p>
			<ul>
				<li><a href="${ header.Referer }">${ header.Referer.contains("all") ? '全部' : '我的' }订单</a></li>
				<li><a href="manager/book">图书管理</a></li>
			</ul>
		</section>
		<section class="table-container">
			<table>
		     	<thead>
		     		<tr>
			      		<td>商品ID</td>
			      		<td>商品名称</td>
			      		<td>商品数量</td>
			      		<td>商品单价</td>
			      		<td>总金额</td>
			      	</tr>
		     	</thead>
		     	<tbody>
			      	<c:forEach items="${ orderItemList }" var="orderItem">
			      	<tr>
			      		<th>${ orderItem.id }</th>
			      		<td>${ orderItem.name }</td>
			      		<td>${ orderItem.count }</td>
			      		<td>${ orderItem.price }</td>
			      		<td>${ orderItem.totalPrice }</td>
			      	</tr>
			      	</c:forEach>
		     	</tbody>
			</table>
		</section>
		<%@include file="/pages/common/pagination.jsp" %>
	</main>
	<%@include file="/pages/common/footer.jsp" %>
</body>
</html>